<?php

class User extends Model {

    var $userId = false;
	var $userName = false;
	var $userFullName = false;
	var $userEmail = false;
	var $userDatetime = false;
	
    function User()
    {
        // Call the Model constructor
        parent::Model();
		
		$this->set_vars_from_session();
	}
	
	
	public function set_vars_from_session()
	{
		$this->userId = $this->session->userdata('userId');
		$this->userName = $this->session->userdata('userName');
		$this->userFullName = $this->session->userdata('userFullName');
		$this->userEmail = $this->session->userdata('userEmail');
		$this->userDatetime = $this->session->userdata('userDatetime');
	}
	
	
	public function clear_session()
	{
		$this->session->unset_userdata('userId');
		$this->session->unset_userdata('userName');
		$this->session->unset_userdata('userFullName');
		$this->session->unset_userdata('userEmail');
		$this->session->unset_userdata('userDatetime');
	}
	
	
}

?>